# include<stdio.h>

void fun(char d[],char);

int main(void)
{
	char c[100], ch;

	gets(c);

	ch = getchar();

	fun(c,ch);
	puts(c);
	return 0;
}

void fun(char d[100],char s)
{
	int i,j;

	for(i=j=0;d[i] != '\0';i++)
	{
		if(d[i] != s)
				d[j++] = d[i];
		d[j] = '\0';
	}
	
}
